import req from '@/http/http'
import {getServer} from '@/http/AppApi'

let ZHPQ_SERVER = getServer()

// 部件管理
// 修改
export const updateComponent = data => {
  let path = ZHPQ_SERVER + '/component/' + data.id
  return req.put(path, data)
}
// 删除
export const delComponent = data => {
  let path = ZHPQ_SERVER + '/component/' + data.id
  return req.delete(path)
}
// 获取 查询 分页
export const findComponent = param => {
  let path = ZHPQ_SERVER + '/component'
  return req.get(path, param)
}
// 新增
export const createComponent = data => {
  let path = ZHPQ_SERVER + '/component/'
  return req.post(path, data)
}
